package qmsz.api.service.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import qmsz.api.dao.QMAuthDAO;
import qmsz.api.service.QMAuthService;

@Service
public class QMAuthServiceImpl implements QMAuthService {
	
	private static final Logger logger = Logger.getLogger(QMAuthServiceImpl.class);

	@Autowired
	QMAuthDAO qmauthDAO;
	
	@Override
	public String getAppkeyFromAgencyCode(String agencyCode) {
		String value = null;
		try {
			value = qmauthDAO.getAppsecFromAgencyCode(agencyCode);
		} catch (Exception e) {
			logger.error("query error", e);
			value = null;
		}
		return value;
	}
}
